Auto merge of #3799 - integer32llc:restore-generated-tests-module, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 6 Mar 2017 16:04:27 +0000 (16:04 +0000)
committerbors <bors@rust-lang.org>
Mon, 6 Mar 2017 16:04:27 +0000 (16:04 +0000)
Restore the generated tests module created by `cargo new`

Appears to have been removed unintentionally in #3004.

Was just working on the book, ran `cargo new adder` with cargo-0.18.0-nightly (6f1b860 2017-02-11), and got this in `src/lib.rs`:

```rust
#[test]
fn it_works() {
}
```

when I expected to get this:

```rust
#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
    }
}
```

It looks like this was changed as part of #3004 ([removed](https://github.com/rust-lang/cargo/commit/875a8aba7916b63c3c8464008a271f6082e23779#diff-149dd4362a3b0dc13b113762713119dfL477), [added](https://github.com/rust-lang/cargo/commit/875a8aba7916b63c3c8464008a271f6082e23779#diff-149dd4362a3b0dc13b113762713119dfR678)), I'm assuming unintentionally?

The regression has not yet hit the beta channel; `cargo-0.17.0-nightly (0bb8047 2017-02-06)` generates the src/lib.rs I expect.


Trivial merge